From: Florian Müllner Date: Mon, 28 Oct 2013 10:26:17 +0000 (+0100) Subject: notificationDaemon: Save notifications on source destruction X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3148 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=633dd0d9de3d84234d6c621f3a5e89cd8607e7dd;p=gnome-shell.git notificationDaemon: Save notifications on source destruction While the existing comment is correct in that a source's notifications will be destroyed first, the code takes a shortcut which prevents the Source::count-updated signal from being emitted. Given that the purpose of the signal is to keep notification counters up-to-date which is pointless when the source is about to be destroyed, the shortcut makes sense; just save notifications explicitly in that case. https://bugzilla.gnome.org/show_bug.cgi?id=710596 --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 96b147274..d75224f7f 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -905,10 +905,8 @@ const GtkNotificationDaemon = new Lang.Class({ let source = new GtkNotificationDaemonAppSource(appId); source.connect('destroy', Lang.bind(this, function() { - // When a source is destroyed, it should first - // destroy all of its notifications, so we should - // not need to call _saveNotifications here. delete this._sources[appId]; + this._saveNotifications(); })); source.connect('count-updated', Lang.bind(this, this._saveNotifications)); Main.messageTray.add(source);